package xy.params.entity;

public enum ResultEnum {
    /**
     * 通用状态码
     */
    SUCCESS(1,"success"),
    FAIL(-1,"fail"),
    /* 用户错误  201 - 299  */
    USER_NOT_LOGIN(201,"未登录"),
    USER_NOT_EXIST(202,"用户不存在"),
    USER_LOGIN_ERROR(203,"登陆失败，账号或者密码有误"),
    NOT_PERMISSION(204,"无权限访问"),

    /* 业务异常  201 - 299  */
    BUSI_EXCEPTION(301,"业务异常"),

    /* 空指针异常  101  */
    NULL_POINTER_EXCEPTION(101,"空指针异常"),

    /* 服务器内部异常 500  */
    INTERNAL_SERVER_ERROR_EXCEPTION(500,"服务器异常");

    private Integer code;

    private String msg;


    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
